<template>
  <div class="lynx-main lynx-info">
    <BaseDescriptions :columns="baseColumns" :info="info" />
  </div>
</template>

<script lang="ts" setup>
import BaseDescriptions from '@/components/base/baseDescriptions.vue';

import api from "@/axios/api";
import { ref, reactive, watch } from "vue";
import { ElMessage } from "element-plus";
import { dictRef } from "@/utils/dictUtil";
import { base } from './base';
import { ${dv}, baseColumns } from './main';
const emit = defineEmits(['success']);
const props = defineProps(['idVal']);
const { baseApi } = base;
const info = reactive<${dv}>({});
const dict = dictRef([]);

function updateData(idVal: string) {
  baseApi().info(idVal).then(res => {
    if (res.isSuccess) {
      Object.assign(info, res.data);
    } else {
      ElMessage.error(res.message);
    }
  });
}

watch(() => props.idVal, updateData, { immediate: true });
</script>

<style lang="scss" scoped></style>